<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: IRTItemTest</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">IRTItemTest</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/test/irt_examinee_test_rb.html">
                test/irt_examinee_test.rb
                </a>
        <br />
                <a href="../files/test/irt_item_test_rb.html">
                test/irt_item_test.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Test::Unit::TestCase
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">
    <div id="diagram">
      <map id="map" name="map">
  <area shape="rect" coords="28,101,121,149"      href="IRTItemTest.html" alt="IRTItemTest" />
  <area shape="rect" coords="5,5,144,53"      href="Test/Unit/TestCase.html" alt="Test::Unit::TestCase" />
</map>
<img src="../dot/f_15.png" usemap="#map" border="0" alt="dot/f_15.png">
    </div>

    <div id="description">
      <ul>
<li>irt_item_test.rb

</li>
<li>Copyright (C) 2010 Embian Inc.

<p>
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
</p>
<p>
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
</p>
<p>
You should have received a copy of the GNU General Public License along
with This program. If not, see &lt;<a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/&gt;.
</p>
</li>
</ul>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000033">setup</a>&nbsp;&nbsp;
      <a href="#M000036">setup</a>&nbsp;&nbsp;
      <a href="#M000037">teardown</a>&nbsp;&nbsp;
      <a href="#M000034">teardown</a>&nbsp;&nbsp;
      <a href="#M000035">test_instance_methods_of_examinee_class</a>&nbsp;&nbsp;
      <a href="#M000038">test_instance_methods_of_item_class</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000033" class="method-detail">
        <a name="M000033"></a>

        <div class="method-heading">
          <a href="#M000033" class="method-signature">
          <span class="method-name">setup</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000033-source">
<pre>
    <span class="ruby-comment cmt"># File test/irt_examinee_test.rb, line 20</span>
20:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
21:     <span class="ruby-ivar">@responses</span> = [<span class="ruby-value">1</span>, <span class="ruby-value">1</span>, <span class="ruby-value">1</span>, <span class="ruby-value">0</span>, <span class="ruby-value">-1</span>, <span class="ruby-value">0</span>, <span class="ruby-value">1</span>, <span class="ruby-value">1</span>]
22:     <span class="ruby-ivar">@no</span> = <span class="ruby-value">1</span>
23:     <span class="ruby-ivar">@group</span> = <span class="ruby-value">1</span>
24:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000036" class="method-detail">
        <a name="M000036"></a>

        <div class="method-heading">
          <a href="#M000036" class="method-signature">
          <span class="method-name">setup</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000036-source">
<pre>
    <span class="ruby-comment cmt"># File test/irt_item_test.rb, line 20</span>
20:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>
21:     <span class="ruby-comment cmt">#Do nothing</span>
22:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000037" class="method-detail">
        <a name="M000037"></a>

        <div class="method-heading">
          <a href="#M000037" class="method-signature">
          <span class="method-name">teardown</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000037-source">
<pre>
    <span class="ruby-comment cmt"># File test/irt_item_test.rb, line 24</span>
24:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">teardown</span>
25:     <span class="ruby-comment cmt">#Do nothing</span>
26:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000034" class="method-detail">
        <a name="M000034"></a>

        <div class="method-heading">
          <a href="#M000034" class="method-signature">
          <span class="method-name">teardown</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000034-source">
<pre>
    <span class="ruby-comment cmt"># File test/irt_examinee_test.rb, line 26</span>
26:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">teardown</span>
27:     <span class="ruby-comment cmt">#Do nothing</span>
28:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000035" class="method-detail">
        <a name="M000035"></a>

        <div class="method-heading">
          <a href="#M000035" class="method-signature">
          <span class="method-name">test_instance_methods_of_examinee_class</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000035-source">
<pre>
    <span class="ruby-comment cmt"># File test/irt_examinee_test.rb, line 30</span>
30:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_instance_methods_of_examinee_class</span>
31:     <span class="ruby-identifier">examinee</span> = <span class="ruby-constant">IRTExaminee</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;id##{@no}&quot;</span>, <span class="ruby-ivar">@responses</span>, <span class="ruby-node">&quot;810000-00000#{@no}&quot;</span>, <span class="ruby-ivar">@group</span>)
32:     <span class="ruby-identifier">assert_not_nil</span>(<span class="ruby-identifier">examinee</span>)
33:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value str">&quot;id#1&quot;</span>, <span class="ruby-identifier">examinee</span>.<span class="ruby-identifier">eid</span>)
34:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-ivar">@responses</span>, <span class="ruby-identifier">examinee</span>.<span class="ruby-identifier">responses</span>)
35:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-node">&quot;810000-00000#{@no}&quot;</span>, <span class="ruby-identifier">examinee</span>.<span class="ruby-identifier">social_no</span>)
36:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-ivar">@group</span>, <span class="ruby-identifier">examinee</span>.<span class="ruby-identifier">group</span>)
37:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-ivar">@no</span>, <span class="ruby-identifier">examinee</span>.<span class="ruby-identifier">no</span>)
38:     
39:     <span class="ruby-identifier">examinee</span>.<span class="ruby-identifier">theta</span> = <span class="ruby-value">1.15</span>
40:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1.15</span>, <span class="ruby-identifier">examinee</span>.<span class="ruby-identifier">theta</span>)
41:     
42:     <span class="ruby-identifier">examinee</span>.<span class="ruby-identifier">no</span> = <span class="ruby-value">2</span>
43:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">5</span>, <span class="ruby-identifier">examinee</span>.<span class="ruby-identifier">ctt_score</span>)
44:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000038" class="method-detail">
        <a name="M000038"></a>

        <div class="method-heading">
          <a href="#M000038" class="method-signature">
          <span class="method-name">test_instance_methods_of_item_class</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000038-source">
<pre>
    <span class="ruby-comment cmt"># File test/irt_item_test.rb, line 28</span>
28:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_instance_methods_of_item_class</span>
29:     <span class="ruby-identifier">item</span> = <span class="ruby-constant">IRTItem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;id##{1}&quot;</span>)
30:     <span class="ruby-identifier">assert_not_nil</span>(<span class="ruby-identifier">item</span>)
31:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value str">&quot;id#1&quot;</span>, <span class="ruby-identifier">item</span>.<span class="ruby-identifier">iid</span>)
32:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">item</span>.<span class="ruby-identifier">no</span>)
33:     
34:     <span class="ruby-identifier">item</span>.<span class="ruby-identifier">irt_a</span> = <span class="ruby-value">0</span><span class="ruby-value">.159</span>
35:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">0</span><span class="ruby-value">.159</span>, <span class="ruby-identifier">item</span>.<span class="ruby-identifier">irt_a</span>)
36:     
37:     <span class="ruby-identifier">item</span>.<span class="ruby-identifier">irt_b</span> = <span class="ruby-value">1.222</span>
38:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">1.222</span>, <span class="ruby-identifier">item</span>.<span class="ruby-identifier">irt_b</span>)
39:     
40:     <span class="ruby-identifier">item</span>.<span class="ruby-identifier">irt_c</span> = <span class="ruby-value">0</span><span class="ruby-value">.000</span>
41:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value">0</span><span class="ruby-value">.000</span>, <span class="ruby-identifier">item</span>.<span class="ruby-identifier">irt_c</span>)
42:     
43:     <span class="ruby-identifier">item</span>.<span class="ruby-identifier">answer</span> = <span class="ruby-value str">'A'</span>
44:     <span class="ruby-identifier">assert_equal</span>(<span class="ruby-value str">'A'</span>, <span class="ruby-identifier">item</span>.<span class="ruby-identifier">answer</span>)
45:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>